using System;
using System.Data;
using System.ComponentModel;
using System.Reflection;
using System.Collections.Generic;
using DataObject.Helpers;

namespace DataObject.Model
{
	[Serializable]
	public class ContactDTO : DTOBase
	{
        public ContactDTO()
        {
            ContactID = Helper.NewSeqGuid();
            ModifiedDate = DateTime.Now;
        }

		#region Reference property Members


		#endregion

		#region Collection Members

		private IList<ProviderContactDTO> _providerContactCollection = new List<ProviderContactDTO>();
		public IList<ProviderContactDTO> ProviderContactCollection
		{
			get
			{
				return _providerContactCollection;
			}
			set
			{
				if (_providerContactCollection != value)
				{
					_providerContactCollection = value;
					OnChanged();
				}
			}
		}

		#endregion

		#region Property Active

		private bool _active;

		/// <summary>
		///  Property Active
		/// <summary>
		public bool Active
		{
			get
			{
				return _active;
			}

			set
			{
				if (_active != value)
				{
					this.OnActiveChanging(value);
					_active = value;
					this.OnActiveChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Property CellPhone

		private string _cellPhone;

		/// <summary>
		///  Property CellPhone
		/// <summary>
		public string CellPhone
		{
			get
			{
				return _cellPhone;
			}

			set
			{
				if (_cellPhone != value)
				{
					this.OnCellPhoneChanging(value);
					_cellPhone = value;
					this.OnCellPhoneChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Property ContactID

		private Guid _contactID;

		/// <summary>
		///  Property ContactID
		/// <summary>
		public Guid ContactID
		{
			get
			{
				return _contactID;
			}

			set
			{
				if (_contactID != value)
				{
					this.OnContactIDChanging(value);
					_contactID = value;
					this.OnContactIDChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Property ContactName

		private string _contactName;

		/// <summary>
		///  Property ContactName
		/// <summary>
		public string ContactName
		{
			get
			{
				return _contactName;
			}

			set
			{
				if (_contactName != value)
				{
					this.OnContactNameChanging(value);
					_contactName = value;
					this.OnContactNameChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Property Email

		private string _email;

		/// <summary>
		///  Property Email
		/// <summary>
		public string Email
		{
			get
			{
				return _email;
			}

			set
			{
				if (_email != value)
				{
					this.OnEmailChanging(value);
					_email = value;
					this.OnEmailChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Property Gender

		private bool _gender;

		/// <summary>
		///  Property Gender
		/// <summary>
		public bool Gender
		{
			get
			{
				return _gender;
			}

			set
			{
				if (_gender != value)
				{
					this.OnGenderChanging(value);
					_gender = value;
					this.OnGenderChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Property HomePhone

		private string _phone;

		/// <summary>
		///  Property Phone
		/// <summary>
		public string Phone
		{
			get
			{
                return _phone;
			}

			set
			{
                if (_phone != value)
				{
					this.OnPhoneChanging(value);
                    _phone = value;
					this.OnPhoneChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Property ModifiedBy

		private string _modifiedBy;

		/// <summary>
		///  Property ModifiedBy
		/// <summary>
		public string ModifiedBy
		{
			get
			{
				return _modifiedBy;
			}

			set
			{
				if (_modifiedBy != value)
				{
					this.OnModifiedByChanging(value);
					_modifiedBy = value;
					this.OnModifiedByChanged();
				}
			}
		}

		#endregion

		#region Property ModifiedDate

		private DateTime? _modifiedDate;

		/// <summary>
		///  Property ModifiedDate
		/// <summary>
		public DateTime? ModifiedDate
		{
			get
			{
				return _modifiedDate;
			}

			set
			{
				if (_modifiedDate != value)
				{
					this.OnModifiedDateChanging(value);
					_modifiedDate = value;
					this.OnModifiedDateChanged();
				}
			}
		}

		#endregion

		#region Property WorkExtension

		private string _workExtension;

		/// <summary>
		///  Property WorkExtension
		/// <summary>
		public string WorkExtension
		{
			get
			{
				return _workExtension;
			}

			set
			{
				if (_workExtension != value)
				{
					this.OnWorkExtensionChanging(value);
					_workExtension = value;
					this.OnWorkExtensionChanged();
					OnChanged();
				}
			}
		}

		#endregion

		#region Extensibility Method Declarations

		protected virtual void OnActiveChanging(bool active) { }
		protected virtual void OnActiveChanged() { }
		protected virtual void OnCellPhoneChanging(string cellPhone) { }
		protected virtual void OnCellPhoneChanged() { }
		protected virtual void OnContactIDChanging(Guid contactID) { }
		protected virtual void OnContactIDChanged() { }
		protected virtual void OnContactNameChanging(string contactName) { }
		protected virtual void OnContactNameChanged() { }
		protected virtual void OnEmailChanging(string email) { }
		protected virtual void OnEmailChanged() { }
		protected virtual void OnGenderChanging(bool gender) { }
		protected virtual void OnGenderChanged() { }
		protected virtual void OnPhoneChanging(string homePhone) { }
		protected virtual void OnPhoneChanged() { }
		protected virtual void OnModifiedByChanging(string modifiedBy) { }
		protected virtual void OnModifiedByChanged() { }
		protected virtual void OnModifiedDateChanging(DateTime? modifiedDate) { }
		protected virtual void OnModifiedDateChanged() { }
		protected virtual void OnWorkExtensionChanging(string workExtension) { }
		protected virtual void OnWorkExtensionChanged() { }

		#endregion

	}
}
